﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConnectFour
{
    class RandomPlayer : Player
    {
        static Random r = new Random();

        public RandomPlayer(Checker myColor, Board board) : base(myColor, board, null) { }

        public override void GameOver(Checker winner) { }

        public override int Move(int lastMove)
        {
            int move = r.Next(0, 7);
            while (!board.Playable(move)) { move = r.Next(0, 6); }
            return move;
        }  
    }
}
